package com.watch.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.watch.system.model.bo.UserFormBO;
import com.watch.system.model.dto.UserAuthInfo;
import com.watch.system.model.entity.CarResources;
import com.watch.system.model.entity.CarUser;
import com.watch.system.model.form.CarUserForm;
import com.watch.system.model.form.ResourcesForm;
import com.watch.system.model.query.CarResoucesPageQuery;
import com.watch.system.model.query.CarUserPageQuery;
import com.watch.system.model.query.UserPageQuery;
import com.watch.system.model.vo.*;
import com.watch.system.plugin.mybatis.annotation.DataPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户持久层
 *
 * @author gmli
 * @since 2024/2/5
 */
@Mapper
public interface ResourcesMapper extends BaseMapper<CarResources> {


    Page<CarResourcesPageVO> getResourcesPage(Page<CarUserPageVO> page, CarResoucesPageQuery queryParams);

    Page<CarResourcesImgPageVO> getResourcesImgPage(Page<CarResourcesImgPageVO> page, CarResoucesPageQuery queryParams);

    boolean saveResources(ResourcesForm resourcesForm);

    boolean deleteResources(@Param("ids") List<Long> ids);


    boolean saveResourcesImg(String[] imgList);

    boolean deleteResourcesImg(List<Long> ids);

    List<CarResourcesExportVO> listExportResources(CarResoucesPageQuery queryParams);

    int saveResourcesServiceImport(CarResourcesImportVO carResourcesImportVO);
}
